package com.dhcc.bpm.alarm.config;

public enum NoticeMethod {
    SMS("短信通知", "01"), WECHAT("微信通知", "02"),
    EMAIL("邮件通知", "03"), API("API", "04"),H5("H5", "05")
    ,WXWORK("企业微信", "06");
    private final String value;
    private String key;
    // 构造方法
    private NoticeMethod(String value, String key) {
        this.value = value;
        this.key = key;
    }
    // 普通方法
    public static String getValue(String key) {
        for (NoticeMethod c : NoticeMethod.values()) {
            if (c.getKey().equals(key)) {
                return c.value;
            }
        }
        return "";
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

}
